import http from '@/utils/request'

export function getShopInfo(shopId) {
	return http.get('/user/shop/detail/' + shopId)
}

export function getAllByCate(param) {
	return http.post('/user/goods/allbycate', param)
}

export function searchGoodsByName(param) {
	return http.post('/user/goods/searchGoods', param)
}

export function editShopInfo(param) {
	return http.post('/shop/my/edit',param)
}

// 获取推荐商品
export function getRecommended(shopId) {
	return http.get('/shop/recommended/list/' + shopId)
}


export function delRecommended(param) {
	return http.delete('/shop/recommended/del',param)
}

export function openShop() {
	return http.get('/shop/my/open')
}

export function closeShop() {
	return http.get('/shop/my/close')
}

export function getMarketing(shopId) {
	return http.get('/user/shop/marketing/' + shopId)
}